package com.java;

import java.util.Scanner;

public class Test9 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);            //从键盘获取数字
        int ret = scanner.nextInt();

        System.out.println("偶数");
        for(int i = 0; i <= 30; i = i + 2) {              //注意：i = i + 2  才能输出偶数位
            System.out.print(((ret >> i) & 1)+"  ");      //每次取出一位，在右移，依次循环
        }

        System.out.println();                          //换行

        System.out.println("奇数");
        for(int j = 1; j <= 31; j = j + 2) {
            System.out.print(((ret >> j) & 1)+"  ");      //每次取出一位，在右移，依次循环
        }
        System.out.println();
    }
}
